function checkIsPdf (filename) {
    // 将文件名转换为小写，确保不区分大小写
    const lowerCaseFileName = filename.toLowerCase();
    // 检查文件名是否以 .pdf 结尾
    return lowerCaseFileName.endsWith('.pdf');
}


function generateRandomString(length) {
    const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    let result = '';
    for (let i = 0; i < length; i++) {
        const randomIndex = Math.floor(Math.random() * characters.length);
        result += characters.charAt(randomIndex);
    }
    return result;
}

// console.log('isPdf',checkIsPdf('example.pdf'));
// console.log('isPdf',checkIsPdf('example.df'));

console.log(generateRandomString(8));
